﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace iLangl.Transport.Communication
{
	public class BaseRobot : IRobot
	{
		#region IRobot Members

		public virtual void Execute()
		{
			IRobotItem ri = GetOperation.Get();
			Item = ri;
			if (ri != null)
				SetOperation.Set(ri);
		}

		private IRobotGet _getOperation;
		public virtual IRobotGet GetOperation
		{
			get
			{
				return _getOperation;
			}
			set
			{
				_getOperation = value;
			}
		}

		private IRobotSet setOperation;
		public virtual IRobotSet SetOperation
		{
			get
			{
				return setOperation;
			}
			set
			{
				setOperation = value;
			}
		}


		private IRobotItem _item;
		public virtual IRobotItem Item
		{
			get
			{
				return _item;
			}
			set
			{
				_item = value;
			}
		}

		#endregion
	}
}
